package com.xmall.define.constants;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.List;

@Data
@Component
@RefreshScope
public class CommonProperties {

    /**
     * 重复提交 token 有效期
     */
    @Value("${redis.repeatSubmitTokenExpiredSeconds}")
    private Long repeatSubmitTokenExpiredSeconds = 1800L;

    /**
     * 消息日志重试时间间隔列表
     */
    @Value("${msg.logRetryIntervalSecondsList}")
    private List<Integer> logRetryIntervalSecondsList = Arrays.asList(10, 60, 300, 600);
}
